package demo1;

public class Animal {
    public String color;//颜色
    public int age;//年龄
    public String name;//名字

    public Animal(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
    }


    public void eat()
    {
        System.out.println(this.name + "正在吃饭");
    }


    public Animal sleep() {
        System.out.println("动物在睡觉");
        return null;
    }

   protected void play() {
        System.out.println("动物在玩乒乓球");
    }

}
